<template>
    <div>
        <h1>{{ authedmsg }}</h1>
        <div style="text-align: right;width: 100%;height: 100%">
            <div style="word-wrap: break-word;word-break: break-all;width: 200px;">{{ token }}</div>
        </div>
    </div>

</template>

<script>
    import {mapActions, mapState} from 'vuex'

    export default {
        name: "Authed",
        computed:mapState({
                // 箭头函数可使代码更简练
                authedmsg: state => state.authedmsg,
                token: state => state.token,
            })
        ,
        methods: {
            ...mapActions([
                'getAuthed'
            ]),
        },
        created: function () {
            this.getAuthed();
        }
    }
</script>

<style scoped>

</style>